<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/1/18
  Time: 17:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<a href="<%=request.getContextPath()%>/insertStudent.jsp">新增</a>
<table border="1" cellspacing="0" cellpadding="0" width="100%">
    <tr>
        <td>ID</td>
        <td>姓名</td>
        <td>性别</td>
        <td>入学日期</td>
        <td>家庭地址</td>
        <td>父亲姓名</td>
        <td>父亲电话</td>
        <td>父亲单位</td>
        <td>母亲姓名</td>
        <td>母亲电话</td>
        <td>母亲单位</td>
        <td>操作</td>
    </tr>
    <c:forEach var="item" items="${students}">
        <tr>
            <td>${item.studentId}</td>
            <td>${item.studentName}</td>
            <td>${item.gender}</td>
            <td><fmt:formatDate value="${item.enrollmentdate}" pattern="yyyy-MM-dd hh:mm:ss"></fmt:formatDate></td>
            <td>${item.homeAddress}</td>
            <td>${item.fatherName}</td>
            <td>${item.fatherPhone}</td>
            <td>${item.fatherUnit}</td>
            <td>${item.motherName}</td>
            <td>${item.motherPhone}</td>
            <td>${item.motherUnit}</td>
            <td>
                <a href="<%=request.getContextPath()%>/student/selectById?id=${item.studentId}">修改</a>
                <a href="<%=request.getContextPath()%>/student/delete?id=${item.studentId}">删除</a>
            </td>
        </tr>
    </c:forEach>
</table>
<a href="<%=request.getContextPath()%>/cook/selectAll">职工模块-厨师</a>
<a href="<%=request.getContextPath()%>/teacher/selectAll">职工模块-教师</a>
</body>
</html>
